<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>新增连载内容</title>
<link href="../member/templets/style/base.css" rel="stylesheet" type="text/css" />
<script language="javascript" type="text/javascript" src="../images/js/j.js"></script>
<script language="javascript" type="text/javascript" src="../member/templets/js/table_function.js"></script>
<script language="javascript" type="text/javascript" src="js/main.js"></script>
<script language="javascript" type="text/javascript" src="js/story.js"></script>
</head>
<body>
<div id="main">
  <?php include(DEDEMEMBER."../templets/head.htm"); ?>
  <div id="content" class="w960 clearfix">
    <?php include(DEDEMEMBER."./templets/menu.php"); ?>
    <div id="mcpmain">
      <div id="appTab">
        <ul>
          <li class="thisTab"><a href="mybooks.php"><span>连载书目</span></a></li>
          <li><a href="story_list_content.php"><span>连载内容</span></a></li>
        </ul>
      </div>
      <ul class="tabSub">
        <li <?php echo ($arcrank=='')? "class='thisTab'" : "";?>><a href="story_add_content.php?bookid=<?php echo $bookid; ?>"><span>新增连载</span></a></li>
        <li <?php echo ($arcrank=='1')? "class='thisTab'" : "";?>><a href="story_list_content.php?bookid=<?php echo $bookid; ?>"><span>连载内容</span></a></li>
        <li <?php echo ($arcrank=='-1')? "class='thisTab'" : "";?>><a href="story_list_chapter.php?bookid=<?php echo $bookid; ?>"><span>书目章节</span></a></li>
        <li <?php echo ($arcrank=='-2')? "class='thisTab'" : "";?>><a href="story_edit.php?bookid=<?php echo $bookid; ?>"><span>书目资料</span></a></li>
      </ul>
      <div id="mainCp">
      <h3 class="meTitle"><strong>&nbsp;新增连载</strong></h3>  
        <form class="mL10 mR10 mTB10" action="story_add_content_action.php" method="post" onsubmit="return checkSubmitAddCt();">
          <input type="hidden" name="bookid" value="<?php echo $bookid; ?>" />
          <input type="hidden" name="catid" value="<?php echo $catid; ?>" />
          <input type="hidden" name="bookname" value="<?php echo str_replace("'","`",$bookname); ?>" />
          <input type="hidden" name="booktype" value="<?php echo $booktype; ?>" />
          <table cellspacing="1" class="submit" width="100%">
            <tbody>
              <tr>
                <td width="15%" align="right" valign="top">隶属连载：</td>
                <td><?php echo $bookname; ?></td>
              </tr>
              <tr>
                <td align="right" valign="top">小节标题：</td>
                <td><input name="title" type="text" class="text" id="title" value="" size="45" /></td>
              </tr>
              <tr>
                <td align="right" valign="top">隶属章节：</td>
                <td><?php 
								if(count($chapters)>0){
							?>
                  <select name="chapterid" size="5" id="chapterid">
                    <?php
								$ok = false;
								foreach($chapters as $k=>$v){
									if(!$ok){ $ok=true; echo "    <option value='$k' selected>第{$chapnums[$k]}章 $v</option>\r\n"; }
									else echo "    <option value='$k'>第{$chapnums[$k]}章 $v</option>\r\n";
								}
								?>
                  </select>
                  <hr />
                  <?php
								}
							
							?>
                  <input name="addchapter" type="checkbox" id="addchapter" value="1" <?php echo(count($chapters)>0 ? "" : " checked"); ?> />
                  <label for="addchapter">添加新章节:</label>
                  <input name="chapternew" class="text" type="text" id="chapternew" size="30" value="默认章节" style="width:135px;" />
                  若无可选章节或已有章节结束，请填写新章节名称，无需加“第X章”这样的字样 </td>
              </tr>
              <tr>
                <td align="right" valign="top">章节内容：</td>
                <td><?php GetEditor("body","",300,"MemberLit");?></td>
              </tr>
            </tbody>
            <tfoot>
              <tr>
                <td height="45" align="right" valign="top">&nbsp;</td>
                <td height="45"><button class="button2" type="submit">提交</button>
                  <button class="button2 mL10" type="reset" onclick="location.reload();">重置</button></td>
              </tr>
            </tfoot>
          </table>
        </form>
        </div>
        <!--主操作区域 -->
      </div>
 <div class="clear"></div>
    </div>
  </div>
<?php include(DEDEMEMBER."./templets/foot.htm"); ?>
</div>
</body>
</html>